import { lazy } from "react";
import {RouterList} from "../untils/index"
export let mianrouter:RouterList = [
  {
    path: "/index/home",
    element: lazy(() => import("../page/index/Home")),
    title: "首页",
    icon:'FriendsO'
  },
  {
    path: "/index/my",
    element: lazy(() => import("../page/index/My")),
    title: "我的",
    icon:'HomeO'
  },
  {
    path: "/index/nav",
    element: lazy(() => import("../page/index/Nav")),
    title: "导航",
    icon:'Search'
  },
  {
    path: "/index/classfy",
    element: lazy(() => import("../page/index/Classfy")),
    title: "分类",
    icon:'SettingO'
  },
];
const routes:RouterList = [
  {
    path: "/index",
    element: lazy(() => import("../page/Index")),
    children: mianrouter,
  },
  {
    path: "/deils/:id",
    element: lazy(() => import("../page/Deils")),
  },
  {
    path: "*",
    element: lazy(() => import("../page/Error")),
  },
  {
    path: "/login",
    element: lazy(() => import("../page/Login")),
  },
  {
    path: "/shopcar",
    element: lazy(() => import("../page/Shopcar")),
  },
  {
    path: "/",
    to: "/index/home",
  },
];

export default routes;
